const shopsDao = require("../dao/shopsDao");

let getShops = async () => {
    const data = await shopsDao.getShops();
    return data;
}

let deleteShops = async (_id) => {
    const data = await shopsDao.deleteShops({ _id });
    return data;
}

let insertShops = async (shop) => {
    const data = await shopsDao.insertShops(shop);
    return data;
}

let updataShops = async (shop) => {
    const data = await shopsDao.updataShops({ _id: shop._id }, { $set: shop });
    return data;
}

module.exports = {
    getShops, deleteShops, insertShops, updataShops
}